package com.lanswon.common.enums;


public enum BindType {
	// 正常
	UNBINDED(0, "未绑定"),
	// 禁用
	BINDED(1, "已绑定");
	private Integer code;
	private String value;

	private BindType(Integer code, String value) {
		this.code = code;
		this.value = value;
	}

	public Integer getCode() {
		return code;
	}

	public void setCode(Integer code) {
		this.code = code;
	}

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}

	public static String getValueByCode(Integer code) {
		BindType[] values = BindType.values();
		for (BindType formatType : values) {
			Integer typeCode = formatType.getCode();
			if (typeCode.equals(code)) {
				return formatType.getValue();
			}
		}
		return "";
	}
}
